<!DOCTYPE html>
<html>
<head>
  <title><%= title %></title>
  <link rel="stylesheet" href="/stylesheets/style.css">
  <link rel="stylesheet" href="/stylesheets/index.css">
</head>
<body>
  <div class="container">
    <h4 class="index-title">爬虫控制台</h4>
    <form action="/crawler" method="post" onsubmit="handleSubmit(event)">
      <input type="itemId" name="itemId" placeholder="请输入ebay网站的itemId" required>
      <button type="submit" id="submitBtn">开始爬取</button>
    </form>
  </div>
  <script>
    function handleSubmit(event) {
      const submitBtn = document.getElementById('submitBtn');
      submitBtn.disabled = true;
      submitBtn.innerHTML = '<div class="loading"></div> 爬取中...';
    }
  </script>
</body>
</html>